﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace JTicket.UI
{
    public partial class S_RePrint : System.Web.UI.Page
    {
        private readonly BLL.D_OperInfo bllOper = new BLL.D_OperInfo();
        public DataSet _ds { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bind();
        }
        void Bind()
        {
            string opercode = string.Empty;
            opercode = bllOper.Oper().OperCode;

            string bdate = DateTime.Now.ToString("yyyy-MM-dd");
            string edate = DateTime.Now.ToString("yyyy-MM-dd");
            if (!string.IsNullOrEmpty(Request.QueryString["bdate"]))
            {
                bdate = Request.QueryString["bdate"].ToString();
                edate = Request.QueryString["edate"].ToString();
            }
            
            _ds = DAL.H_BookInfo.P_Select(bdate.Replace("-", ""), edate.Replace("-", ""), opercode, "", "重打票记录");
        }
        public string stat(string r, string flag,string stitlecode)
        {
            switch (r)
            {
                case "-1":
                    return "<a title='申请审核' href=\"javascript:IsExt('" + flag + "','"+stitlecode+"');\">申请审核</a>";
                case "2":
                    return "<a title='申请审核' href=\"javascript:IsExt('" + flag + "','" + stitlecode + "');\">申请审核</a>";
                case "1":
                    return "<font color=Green>等待审核</font>";
                case "0":
                    return "<font color=red>审核通过</font><a title='重打印票' href=\"#\" onclick=\"window.showModalDialog('S_Print.aspx?ordercode=" + flag + "&TitleCode=" + stitlecode + "','','location:No;status:No;help:No;dialogWidth:900px;dialogHeight:500px;scroll:no');\"><img border=0 src='images/print.gif' /></a>";
 
                default:
                    return "申请审核";
            }
        }
    }
}